![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
typed-numbers
Advanced tools
Super simple type-safe fixed-length integers for TypeScript/JavaScript
Super simple type-safe fixed-length integers for TypeScript/JavaScript
About • Installation • Usage • Naming Scheme • License
I've made this library while building a little Intel 8080 emulator in JavaScript.
I noticed the lack of typed numbers in JavaScript, and how useful they could be, and then made this idea into a whole library!
With npm:
$ npm install typed-numbers
With pnpm (recommended):
$ pnpm install typed-numbers
With yarn:
$ yarn add typed-numbers
or you can directly add it to your website via unpkg:
<script src="https://unpkg.com/typed-numbers"></script>
If this project gains more attention I'll add some documentation!
import { u8, u16 } from 'typed-numbers';
// Function that takes only 16-bit unsigned integers:
function getFirstByte(num: u16): u8 {
return u8(num & 0xf);
}
getFirstByte(127); // -> ERROR!
getFirstByte(u8(127)); // -> ERROR!
getFirstByte(u16(127)); // -> 15
// Define a 8-bit unsigned integer:
const num = u8(255);
// Add 1 (wrapped addition)
num = u8(num + 1);
// Output result
console.log(num); // -> 0
The library uses the fixed-length integer naming scheme from Rust.
If you want to use another naming scheme just rename the types at import:
import { i8 as int8 } from 'typed-numbers';
or:
import { i8 as byte } from 'typed-numbers';
FAQs
Super simple type-safe fixed-length integers for TypeScript/JavaScript
The npm package typed-numbers receives a total of 2 weekly downloads. As such, typed-numbers popularity was classified as not popular.
We found that typed-numbers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.